From 4453129a0b37748ddbb151a1619c49cebab1069b Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Wed, 25 Jan 2017 11:14:43 +0000 Subject: [PATCH] fuzz/libelf: exit with fuzzer function return value Now the function can return nonzero value. Use that value as exit code for the stub program. AFL might be able to use such information to optimise fuzzing process. Signed-off-by: Wei Liu --- tools/fuzz/libelf/afl-libelf-fuzzer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/fuzz/libelf/afl-libelf-fuzzer.c b/tools/fuzz/libelf/afl-libelf-fuzzer.c index b5668c11e7..02cbfb0e2c 100644 --- a/tools/fuzz/libelf/afl-libelf-fuzzer.c +++ b/tools/fuzz/libelf/afl-libelf-fuzzer.c @@ -42,9 +42,7 @@ int main(int argc, char **argv) fclose(fp); - LLVMFuzzerTestOneInput(input, size); - - return 0; + return LLVMFuzzerTestOneInput(input, size); } /* -- 2.30.2